#include "Command.h"

using namespace std;

int main(int argc, char *argv[])
{
    Invoker  *invoker  = new Invoker;
    Receiver *receiver = new Receiver();

    invoker->executeCommand(new HelloCommand(receiver));
    invoker->executeCommand(new Bro666Command(receiver));
    invoker->executeCommand(new NiubilityCommand(receiver));
    invoker->executeCommand(new Bro666Command(receiver));
    invoker->executeCommand(new Bro666Command(receiver));
    invoker->executeCommand(new NiubilityCommand(receiver));
    invoker->executeCommand(new HelloCommand(receiver));
    invoker->executeCommand(new Bro666Command(receiver));
    invoker->executeCommand(new NiubilityCommand(receiver));
    invoker->executeCommand(new Bro666Command(receiver));
    invoker->executeCommand(new NiubilityCommand(receiver));

    invoker->undo();
    receiver->printTextContent();
    return 0;
}